module Base
{
	model Trailer_LiazTruck
	{
		mesh = vehicles/LIAZ300TRUCKTRAILER_Body|TrailerBody2,
		shader = vehicle_norandom_multiuv,
		scale = 1.0,
	}
	model Trailer_LiazTruckfrontwheelleft
	{
		mesh = vehicles/LIAZ300TRUCKTRAILER_Body|LiazTrailerWheelRear,
		texture = vehicles/Liaz300Reartires,
		shader = basicEffect,
                invertX = TRUE,
	}
	model Trailer_LiazTruckfrontwheelright
	{
		mesh = vehicles/LIAZ300TRUCKTRAILER_Body|LiazTrailerWheelRear,
		texture = vehicles/Liaz300Reartires,
		shader = basicEffect,
                invertX = TRUE,
	}
	model Trailer_LiazTruckbackwheelleft
	{
		mesh = vehicles/LIAZ300TRUCKTRAILER_Body|LiazTrailerWheelRear2,
		texture = vehicles/Liaz300Reartires,
		shader = basicEffect,
	}
	model Trailer_LiazTruckbackwheelright
	{
		mesh = vehicles/LIAZ300TRUCKTRAILER_Body|LiazTrailerWheelRear2,
		texture = vehicles/Liaz300Reartires,
		shader = basicEffect,
	}

	vehicle Trailer_LiazTruck
	{
		mechanicType = 2,
		offRoadEfficiency = 0.8,
		engineRepairLevel = 4,
		playerDamageProtection = 0.8,

		model
		{
			file = Trailer_LiazTruck,
			scale = 0.9400,
			offset = 0.0000 1.3617 -0.2660,
		}

		spawnOffsetY = 0.2500000,

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_White,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_Azure,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_Red,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_Yellow,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_Green,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_Blue,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_Black,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_Brown,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_Orange,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_BlueWhole,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_GreenWhole,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_RedWhole,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_RedHalf,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_GreenHalf,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_BlueHalf,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_MilitaryGreen,
		}

		skin
		{
			texture = Vehicles/LiazTRUCKTRAILER_MilitaryGreen2,
		}

		textureMask = Vehicles/LiazTRUCKTRAILER_Mask,
		textureLights = Vehicles/LiazTRUCKTRAILER_Lights,
		textureDamage1Overlay = Vehicles/LiazTRUCKTRAILER_Blood,
		textureDamage2Overlay = Vehicles/LiazTRUCKTRAILER_Blood,
		textureDamage1Shell = Vehicles/LiazTRUCKTRAILER_Damage,
		textureDamage2Shell = Vehicles/LiazTRUCKTRAILER_Damage,
		textureRust = Vehicles/LiazTRUCKTRAILER_Damage,
		extents = 2.5532 2.1915 5.0426,
		mass = 275,
		physicsChassisShape = 2.5532 2.1915 5.0426,
		centerOfMassOffset = 0.0319 1.2128 -0.6064,
		shadowExtents = 2.5175 5.5229,
		shadowOffset = 0.0319 -0.3584,
		engineForce = 3600,
		engineQuality = 60,
		engineLoudness = 55,
		maxSpeed = 70f,
		brakingForce = 1,
		stoppingMovementForce = 2.0f,
		rollInfluence = 0.15f,
		steeringIncrement = 0.03,
		steeringClamp = 0.3,
		suspensionStiffness = 45,
		suspensionCompression = 4.83,
		suspensionDamping = 3.88,
		maxSuspensionTravelCm = 14,
		suspensionRestLength = 0.20f,
		wheelFriction = 4.0f,
		frontEndHealth = 1050,
		rearEndHealth = 1050,

		wheel FrontLeft
		{
			front = true,
			offset = 1.0319 -0.8723 -1.8404,
			radius = 0.56f,
			width = 1.00f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.9787 -0.8723 -1.8404,
			radius = 0.56f,
			width = 1.00f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.0213 -0.8723 -0.6702,
			radius = 0.56f,
			width = 1.00f,
		}

		wheel RearRight
		{
			front = false,
			offset = 0.0213 -0.9043 1.9681,
			radius = 0.56f,
			width = 1.00f,
		}

		area TruckBed
		{
			xywh = 0.0000 -3.5745 2.4894 0.8936,
		}

		area TireFrontLeft
		{
			xywh = 1.3830 -1.8085 0.4468 0.5106,
		}

		area TireFrontRight
		{
			xywh = -1.3830 -1.8936 0.4468 0.5106,
		}

		area TireRearLeft
		{
			xywh = 1.3830 -0.7021 0.4468 0.5106,
		}

		area TireRearRight
		{
			xywh = -1.3830 -0.6489 0.4468 0.5106,
		}

		part GloveBox
		{
			model Liaz300SemiTrailerInterior
			{
				file = Trailer_LiazTruck_Interior,
			}

			area = SeatFrontRight,
			itemType = Base.GloveBox,
			mechanicRequireKey = true,

			lua
			{
				create = Vehicles.Create.Default,
			}
		}

		template = Tire,

		part TireFrontLeft
		{
			model InflatedTirePlusWheel
			{
				file = Trailer_LiazTruckfrontwheelleft,
			}

			table install
			{
				complete = Vehicles.InstallTest.Default,
				requireInstalled = SuspensionRearRight,
			}
		}

		part TireFrontRight
		{
			model InflatedTirePlusWheel
			{
				file = Trailer_LiazTruckfrontwheelright,
			}

			table install
			{
				complete = Vehicles.InstallTest.Default,
				requireInstalled = SuspensionRearRight,
			}
		}

		part TireRearLeft
		{
			model InflatedTirePlusWheel
			{
				file = Trailer_LiazTruckbackwheelleft,
			}

			table install
			{
				complete = Vehicles.InstallTest.Default,
				requireInstalled = SuspensionRearRight,
			}
		}

		part TireRearRight
		{
			model InflatedTirePlusWheel
			{
				file = Trailer_LiazTruckbackwheelright,
			}

			table install
			{
				complete = Vehicles.InstallTest.Default,
				requireInstalled = SuspensionRearRight,
			}
		}

		template = Trunk/part/TruckBed,

		part TruckBed
		{
			container
			{
				capacity = 650,
				conditionAffectsCapacity = false,
			}
		}



		template! = Trailer_LiazTruck_trunkdoor,
		template! = Trailer_LiazTruck_accesories,
		template = Suspension,

		part Suspension*
		{
			table install
			{
				skills = Mechanics:5,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:5,
				recipes = Intermediate Mechanics,
			}
		}

		physics box
		{
			offset = -0.4787 0.8511 2.5426,
			extents = 1.4149 0.1064 0.1064,
			rotate = 0.0000 -49.0000 0.0000,
		}

		physics box
		{
			offset = 0.5426 0.8511 2.5638,
			extents = 1.3298 0.1064 0.1064,
			rotate = 180.0000 -48.0000 180.0000,
		}

		attachment trailer
		{
			offset = 0.0000 -0.5213 4.3511,
			rotate = 0.0000 0.0000 0.0000,
			canAttach = trailer,
			updateconstraint = false,
		}
	}
}
